import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import 'babel-polyfill' // es6转es5
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import '@/assets/icons' // icon
import '@/permission' // permission control
import '@/assets/iconfont/iconfont.css'// 引入字体图标
import '@/directive/drag-directive/index.js'
import '@/utils/index.js'
import Pagination from '@/components/Pagination/index.vue'// 引入分页组件
// 全局引入可编辑表格
import xeUtils from 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'
import VXETablePluginElement from 'vxe-table-plugin-element'
Vue.use(VXETable)
Vue.prototype.$utils = xeUtils
VXETable.use(VXETablePluginElement)
// 引入打印组件
import Print from 'vue-print-nb'
Vue.use(Print) // 注册
// 全局引入复制组件
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
// 全局组件挂载
Vue.component('Pagination', Pagination)
import filters from '@/filters/index'
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
/**
 * This project originally used easy-mock to simulate data,
 * but its official service is very unstable,
 * and you can build your own service if you need it.
 * So here I use Mock.js for local emulation,
 * it will intercept your request, so you won't see the request in the network.
 * If you remove `../mock` it will automatically request easy-mock data.
 */
// import '../mock' // simulation data
Vue.use(ElementUI, { size: 'small' })
Vue.config.productionTip = false
var vue = new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
export default vue
